export function  groupBy(list, listse, listpush) {
    for (let i = 0; i < this.list.length; i++) {
        if (this.listService.indexOf(this.list[i].service_name) === -1) {
            this.listServiceVersion.push({
                service_name: this.list[i].service_name,
                version_name: [this.list[i].version_name],
            });
            this.listService.push(this.list[i].service_name);
        } else {
            for (let j = 0; j < this.listServiceVersion.length; j++) {
                if (this.listServiceVersion[j].service_name === this.list[i].service_name) {
                    this.listServiceVersion[j].version_name.push(this.list[i].version_name);
                    break;
                }
            }
        }
    }
    return  this.listServiceVersion;
  }

//   import {aa, bb, cc} from '../../../../common/utils';

export function isJson(str) {
    try {
        console.log("isJson:", typeof(str), JSON.stringify(str))
        JSON.parse(str)
    } catch (e) {
        return false;
    }
    return true;
}